<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <th:block th:include="common.html :: source"></th:block>
</head>
<body>

<th:block th:include="common.html :: header"></th:block>

<div class="i_bg bg_color">
    <div class="m_content">

        <div class="m_left">
            <div class="left_n">管理中心</div>
            <div class="left_m">
                <div class="left_m_t t_bg1">订单中心</div>
                <ul>
                    <li><a href="/orderList">我的订单</a></li>
                </ul>
            </div>
            <div class="left_m">
                <div class="left_m_t t_bg2">会员中心</div>
                <ul>
                    <li><a href="/userInfo">用户信息</a></li>
                    <li><a href="/userAddressList">地址管理</a></li>
                </ul>
            </div>
            <div class="left_m">
                <div class="left_m_t t_bg1">积分中心</div>
                <ul>
                    <li><a href="#">我的积分</a></li>
                </ul>
            </div>
            <div class="left_m">
                <div class="left_m_t t_bg2">后台管理</div>
                <ul>
                    <li>
                        <input id="userType" type="hidden" th:value="${session.user.type}">
                        <a href="javascript:void(0)" onclick="toBack()">后台信息</a>
                    </li>
                </ul>
                <script type="text/javascript">
                    function toBack() {
                        let userType = $("#userType").val();
                        if (userType === 'false') {
                            alert("权限不足，请联系管理员！");
                            return false;
                        }
                        window.location.href = "/back/main";
                    }
                </script>
            </div>
        </div>

        <div class="m_right" id="content">
            <p></p>
            <p></p>
            <div class="mem_tit">积分列表</div>
            <table border="0" class="order_tab"
                   style="width: 930px; text-align: center; margin-bottom: 30px;"
                   cellspacing="0" cellpadding="0">
                <tbody>

                <div>
                    <tr class="td_bg" style="margin-bottom: 30px;">
                        <td>用户名:[[${session.user.userName}]]</td>
                        <td>积分总额:[[${integerTotal}]]</td>
                        <td></td>
                    </tr>
                </div>
                </tbody>
            </table>
            <p></p>
            <p></p>
            <div class="mem_tit">积分详情</div>
            <table border="0" class="order_tab"
                   style="width: 930px; text-align: center; margin-bottom: 30px;"
                   cellspacing="0" cellpadding="0">
                <tbody>
                <div th:each="orders:${orderList}">
                    <tr class="td_bg">
                        <td>订单号:[[${orders.serialnumber}]]</td>
                        <td>地址:[[${orders.userAddress}]]</td>
                        <td>积分:[[${orders.integral}]]</td>
                    </tr>
                </div>
                </tbody>
            </table>
        </div>
    </div>
</div>

<th:block th:include="common.html :: footer"></th:block>
<th:block th:include="common.html :: permit"></th:block>

</body>
</html>